import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      name: 'login',
      component: () => import('@/views/login/userLogin.vue')
    },
    {
      path: '/',
      name: 'home',
      component: () => import('@/views/layout/layoutIndex.vue'),
      redirect: '/index',
      children: [
        {
          path: 'index',
          component: () => import('@/views/index/homeIndex.vue')
        },
        {
          path: 'signup',
          component: () => import('@/views/signup/signupIndex.vue')
        },
        {
          path: 'bookExam',
          component: () => import('@/views/bookExam/bookExamIndex.vue')
        },
        {
          path: 'bookInterview',
          component: () => import('@/views/bookInterview/bookInterviewIndex.vue')
        }
      ]
    }
  ]
})

export default router
